package com.itheima.service.impl;

import com.github.pagehelper.PageHelper;
import com.itheima.domain.Student;
import com.itheima.mapper.StudentMapper;
import com.itheima.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentServiceImpl implements StudentService {

    @Autowired
    private StudentMapper studentMapper;

    @Autowired
    private StudentMapper studentXmlMapper;

    @Override
    public List<Student> findAll() {
        PageHelper.startPage(1,2);
        List<Student> all = studentMapper.findAll();
        return all;
    }

    @Override
    public List<Student> findAllUserXml() {
        PageHelper.startPage(1,2);
        List<Student> all = studentXmlMapper.findAll();
        return all;
    }
}
